<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.wenwu.common.utils.Status.AttachmentFrom"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>不可移动文化面貌</title>
<script type="text/javascript" src="${path}/js/scripts/bootstart.js"></script>
<link rel="stylesheet" type="text/css" href="${path}/css/focus.css" />
</head>
<body>
	<!-- 附件上传 -->
	<script type="text/plain" id="myEditorFile"></script>
	<form id="culturalForm" method="post">
		<div style="display: none;">
			<input name="cultureId" class="mini-textbox" id="cultureId"/> <input
				name="basicId" class="mini-textbox" id="basicId" />
		</div>
		<div class="form_nav">
			<table width="100%" cellpadding="4" cellspacing="0">
				<tr>
					<td width="10%" class="xx_bt nonebor">文物名称:</td>
					<td width="40%" class="xx_type  nonebor"><input id="basicName"
						name="basicName" style="width: 90%;" class="mini-textbox"
						vtype="maxLength:100" allowInput="false" /><span
						class="required_cls">*</span></td>
					<td width="8%" class="xx_bt nonebor"></td>
					<td width="42%" class="xx_type  nonebor"></td>
				</tr>
				<tr>
					<td class="xx_bt">历史背景:</td>
					<td colspan="3" class="xx_type "><input
						name="historicalBackground" style="width: 97%;" class="mini-textarea"
						vtype="maxLength:1000" /><span class="required_cls">*</span></td>
				</tr>
				
				<tr>
					<td class="xx_bt">文化堆积:</td>
					<td colspan="3" class="xx_type "><input
						name="cuttureAccumulate" style="width: 97%;" class="mini-textarea"
						vtype="maxLength:1000" /><span class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">主要遗迹:</td>
					<td class="xx_type" colspan="3"><input name="mainRelic"
						style="width: 97%;" class="mini-textarea" vtype="maxLength:1000" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">附属文物:</td>
					<td class="xx_type" colspan="3"><input name="attachRelics"
						style="width: 97%;" class="mini-textarea" vtype="maxLength:1000" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">时代特征:</td>
					<td class="xx_type" colspan="3"><input
						name="timeFeature" style="width: 97%;" class="mini-textarea" vtype="maxLength:1000" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">其他:</td>
					<td class="xx_type" colspan="3"><input
						name="other" style="width: 97%;" class="mini-textarea" vtype="maxLength:2000" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">历史价值:</td>
					<td class="xx_type" colspan="3"><input
						name="historicalValue" style="width: 97%;" class="mini-textarea" vtype="maxLength:1000" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">社会价值:</td>
					<td class="xx_type" colspan="3"><input
						name="socialValue" style="width: 97%;" class="mini-textarea" vtype="maxLength:1000" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">艺术价值:</td>
					<td class="xx_type" colspan="3"><input
						name="artValue" style="width: 97%;" class="mini-textarea" vtype="maxLength:1000" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">科学价值:</td>
					<td class="xx_type" colspan="3"><input
						name="scienceValue" style="width: 97%;" class="mini-textarea" vtype="maxLength:1000" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">经济价值:</td>
					<td class="xx_type" colspan="3"><input
						name="economicValue" style="width: 97%;" class="mini-textarea" vtype="maxLength:1000" /><span
						class="required_cls">*</span></td>
				</tr>
				
				<tr>
					<td class="xx_bt">备注:</td>
					<td class="xx_type"><input name="file" style="width: 90%;"
						class="mini-textarea" vtype="maxLength:1000" /><span class="required_cls">*</span></td>
					<td class="xx_bt">
						<!-- 附件上传开始 --> <a class="mini-button" iconCls="icon-upload"
						onclick="upFiles('<%=AttachmentFrom.RELICS_HUMANITY_ENVIRONMENT%>','showfiles')">浏览</a>
						<!-- 附件上传结束-->
					</td>
					<td class="xx_type" id="showfiles" ><c:if
							test="${param.flag=='edit'}">
							<c:if test="${!empty attachments}">
								<c:forEach var="att" items="${attachments}">
									<input type="hidden" value="${att.attachmentPath}"
										name="filePath">
									<input type="hidden" value="${att.attachmentName}"
										name="fileName">
									<input type="hidden" value="${att.attachmentOwner}"
										name="attachmentOwner">
									<a target="_blank" href="${att.attachmentPath}" class="views">${att.attachmentName}</a>
									<br />
								</c:forEach>
							</c:if>
						</c:if></td>
				</tr>
			</table>
		</div>
		<div style="text-align: center; padding: 10px;">
			<a class="mini-button" onclick="addform.saveData" id="sub_button"
				iconCls="icon-save" style="width: 60px; margin-right: 20px;">保存</a>
			<a iconCls="icon-cancel" class="mini-button"
				onclick="$.form.onCancel()" style="width: 60px;">取消</a>
		</div>
	</form>
</body>
<script type="text/javascript" src="${path}/js/scripts/dataform.js"></script>
<script type="text/javascript" charset="utf-8"
	src="${path}/js/scripts/swfupload/swfupload.js"></script>
<script type="text/javascript"
	src="${path}/js/scripts/plugin/ueditor/ueditor.config.js"></script>
<script type="text/javascript"
	src="${path}/js/scripts/plugin/ueditor/ueditor.all.js"></script>
<script type="text/javascript" src="${path}/js/upload.js"></script>
<script type="text/javascript">
	var doc = $(document);
	$(function() {
		$.form.init(); //初始化表单
		window.addform = {};
		addform.saveData = function() {
			var form = new mini.Form("#culturalForm");
			form.validate();
			if (form.isValid() == false) {
				return;
			}
			$.form.saveData({
				url : "${path}/mgr/cultural/addObj",
				showMsg : true,//是否显示提示信息（返回参数必须是msg，json类型数据）
				id : "culturalForm"
			});
		};
	});
	//页面初始化时，执行该函数资源类型
	$.form.loadFormSuccess = function() {
		if(!mini.get("cultureId").value >0){
			mini.get("basicId").setValue("${param.basicId}");
			mini.get("basicName").setValue(decodeURI("${name}"));
		}
	};
	//页面初始化时，执行该函数资源类型
	window.onload = function() {
		if(!mini.get("cultureId").value >0){
			mini.get("basicId").setValue("${param.basicId}");
			mini.get("basicName").setValue(decodeURI("${name}"));
		}
	};
</script>
</html>